From c5d895be237fd4e078eefd5c7e6630a6f4b540fe Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 30 Nov 2009 10:41:28 +0000 Subject: [PATCH] libxenlight: fix hvm flag when no hvmloader Signed-off-by: Tomasz Wroblewski Signed-off-by: Keir Fraser Acked-by: Stefano Stabellini --- tools/libxl/xl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 96ed50ffe4..88771c6f6b 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -263,12 +263,10 @@ static void parse_config_file(const char *filename, init_create_info(c_info); - if (config_lookup_string (&config, "builder", &buf) == CONFIG_TRUE) { - if (!strncmp(buf, "hvm", strlen(buf))) - c_info->hvm = 1; - else - c_info->hvm = 0; - } + c_info->hvm = 0; + if ((config_lookup_string (&config, "builder", &buf) == CONFIG_TRUE) && + !strncmp(buf, "hvm", strlen(buf))) + c_info->hvm = 1; /* hap is missing */ if (config_lookup_string (&config, "name", &buf) == CONFIG_TRUE) -- 2.30.2